package lesson

import (
	"fmt"
	"math"
	"strconv"
)

func Lesson03() {
	fmt.Println("package lesson file lesson/lesson03.go functino Lesson03")

	var _int int
	fmt.Println("init[int]:", _int)
	var _float32 float32
	fmt.Println("init[float32]:", _float32)
	var _string string
	fmt.Println("init[string]:", _string)
	var _bool bool
	fmt.Println("init[int]:", _bool)
	var _array []int
	fmt.Println("init[array int ]:", _array)
	var _array10 [10]int
	fmt.Println("init[array int 10]:", _array10)
	var _arraybool [10]bool
	fmt.Println("init[array bool 10]:", _arraybool)

	// 检查赋值是否类型溢出
	fmt.Println("[math.MinInt32]:", math.MinInt32)
	fmt.Println("[math.MaxInt32]:", math.MaxInt32)

	var value int = 1
	fmt.Println(value)
	// 最简写方式
	value2 := 1
	fmt.Println(value2)

	var a, b, c, d int = 1, 2, 3, 4
	fmt.Println(a)
	fmt.Println(b)
	fmt.Println(c)
	fmt.Println(d)

	var f float32 = 100.1
	g := int(f)
	fmt.Println(g)
	//h := bool(f)
	//fmt.Println(h)

	var i = 65
	j := string(i)
	fmt.Println(j)
	k := strconv.Itoa(i)
	fmt.Println(k)
}
